import { createRouter, createWebHistory } from 'vue-router'

const routes = [
  {
    path:'/',
    name:'layout',
    component:()=>import('../components/Side'),
    // redirect:'/introduction',
    redirect:'/introduction',
    meta:{title:'框架'},
    children:[
      {
        path:'finally',
        name:'finally',
        meta:{title:'看板'},
        component:()=>import('../views/finally')
      },
      {
        path:'home',
        name:'home',
        meta:{title:'首页'},
        component:()=>import('../views/HomeView')
      },
      {
        path:'student',
        name:'student',
        meta:{title:'学员信息'},
        component:()=>import('../views/StudentAdmin')
      },
      {
        path:'coach',
        name:'coach',
        meta:{title:'教练信息'},
        component:()=>import('../views/CoachAdmin')
      },
      {
        path:'admin',
        name:'admin',
        meta:{title:'管理员信息'},
        component:()=>import('../views/AdminAdmin')
      },
      {
        path:'vehicle',
        name:'vehicle',
        meta:{title:'管理员信息'},
        component:()=>import('../views/VehicleAdmin')
      },
      {
        path:'allConserve',
        name:'allConserve',
        meta:{title:'全部预约'},
        component:()=>import('../views/AllConserveCord')
      },
      {
        path:'judgeEnroll',
        name:'judgeEnroll',
        meta:{title:'报名表审核'},
        component:()=>import('../views/JudgeEnroll')
      },
      {
        path:'AllEnroll',
        name:'AllEnroll',
        meta:{title:'考试审批'},
        component:()=>import('../views/AllEnroll')
      },
      {
        path:'AllEnroll2',
        name:'AllEnroll2',
        meta:{title:'考试成绩登记'},
        component:()=>import('../views/AllEnroll2')
      },


      {
        path:'course',
        name:'course',
        meta:{title:'课程信息'},
        component:()=>import('../views/CourseMessage')
      },
      {
        path:'conserve',
        name:'conserve',
        meta:{title:'我的预约'},
        component:()=>import('../views/ConserveCord')
      },
      {
        path:'myMessage',
        name:'myMessage',
        meta:{title:'我的信息'},
        component:()=>import('../views/MyMessage')
      },
      {
        path:'EnrollCord',
        name:'EnrollCord',
        meta:{title:'我的考试'},
        component:()=>import('../views/EnrollCord')
      },

      {
        path:'mycourse',
        name:'mycourse',
        meta:{title:'我的课程'},
        component:()=>import('../views/MyCourse')
      },
      {
        path:'mycourseadmin',
        name:'mycourseadmin',
        meta:{title:'我的课程管理'},
        component:()=>import('../views/MyCourseAdmin')
      },
      {
        path:'myfinishcourse',
        name:'myfinishcourse',
        meta:{title:'完成的课程'},
        component:()=>import('../views/MyFinishCourse')
      },
    ]
  },
  {
    path:'/introduction',
    name:'introduction',
    meta:{title:'网站首页'},
    component:()=>import('../views/Introduction')
  },
  {
    path:'/introduceCoach',
    name:'introduceCoach',
    meta:{title:'教练员'},
    component:()=>import('../views/IntroductionCoach')
  },
  {
    path:'/trainPlace',
    name:'trainPlace',
    meta:{title:'地图'},
    component:()=>import('../views/TrainPlace')
  },
  {
    path:'/test',
    name:'test',
    meta:{title:'注册表'},
    component:()=>import('../views/test')
  },
  {
    path:'/login',
    name:'login',
    meta:{title:'登录注册'},
    component:()=>import('../views/Login'),
    children:[
      {
        path:'loginForm',
        name:'loginForm',
        meta:{title:'登录表单'},
        component:()=>import('../components/loginForm')
      },
      {
        path:'loginHome',
        name:'loginHome',
        meta:{title:'登录选择'},
        component:()=>import('../components/loginHome')
      },
      {
        path:'registerForm',
        name:'registerForm',
        meta:{title:'注册表'},
        component:()=>import('../components/registerForm')
      },
      {
        path:'enroll',
        name:'enroll',
        meta:{title:'报名'},
        component:()=>import('../views/Enroll')
      },
      {
        path:'test1',
        name:'test1',
        meta:{title:'体检'},
        component:()=>import('../views/test1')
      },
      {
        path:'wait',
        name:'wait',
        meta:{title:'等待'},
        component:()=>import('../views/wait')
      },

    ]
  },
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
